package com.tanqing.ddd.web.domain;


import com.tanqing.ddd.domain.domain.DomainEvent;
import com.tanqing.ddd.domain.event.EventQueue;

import java.util.LinkedList;
import java.util.List;

public class BaseEventQueue implements EventQueue {

    private LinkedList<DomainEvent> linkedList = new LinkedList<DomainEvent>();

    @Override
    public void enqueue(DomainEvent domainEvent) {
        linkedList.add(domainEvent);
    }

    @Override
    public List<DomainEvent> queue() {
        return linkedList;
    }
}
